package com.lrabbit.msg;

import com.lrabbit.page.PagingResult;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString(callSuper = true)
public class CommResponse<T> extends BaseResponse {

    @ApiModelProperty(value = "数据集合")
    T data;

    @ApiModelProperty(value = "分页信息")
    private PagingResult pagingResult;

    public CommResponse() {
        super();
    }

    public CommResponse(T data) {
        super();
        this.data = data;
    }

    public CommResponse(String code, String message) {
        super(code, message);
    }

    public CommResponse(T data, PagingResult pagingResult) {
        super();
        this.data = data;
        this.pagingResult = pagingResult;
    }

    public CommResponse(String code, String message, T data) {
        super(code, message);
        this.data = data;
    }

    public CommResponse(String code, String message, T data, PagingResult pagingResult) {
        super(code, message);
        this.data = data;
        this.pagingResult = pagingResult;
    }

}
